<?php
/**
 * Регистрация хука для вывода меню страниц
 *
 */
class PluginContentwedding_HookNews extends Hook
{
    public function RegisterHook()
    {
        $this->AddHook('template_main_menu_item', 'Menu');
    }

    public function Menu()
    {
        $aPages = $this->PluginContentwedding_News_GetPages(array('pid'   => null,
                                                                  'main'  => 1,
                                                                  'active'=> 1));
        $this->Viewer_Assign('aPagesMain', $aPages);
        return $this->Viewer_Fetch(Plugin::GetTemplatePath(__CLASS__) . 'main_menu.tpl');
    }
}

?>